<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class WaterStorageOutShops extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('water_storage_out_shops', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8mb4';
             $table->collation = 'utf8mb4_unicode_ci';
            // CONTENT
            $table->integer('water_storage_out_id')->nullable(false)->comment('出库编号');
			$table->integer('water_my_storage_id')->nullable(false)->comment('库存编号');
			$table->integer('out_num')->nullable(false)->default(0)->comment('出库数量');
			$table->timestamp('created_at')->nullable()->comment('');
			$table->timestamp('updated_at')->nullable()->comment('');
			$table->primary(['water_storage_out_id','water_my_storage_id'], 'water_storage_out_shops_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('water_storage_out_shops');
    }
}
